home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / gwedit.com / TFDDTEST.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1989-03-16  |  1.1 KB  |  48 lines

  1.  
  2. {released to public domain 3/16/89 by author Michael Day}
  3.  
  4. program tfddtest; {a program to test TfddGwEdit}
  5.  
  6. uses crti,graph,gstart,gwedit,gwcurse,AreaWr;
  7.  
  8. var A1,X,Y,Wide,CPos : integer;
  9.     TS,Ps,S : string;
  10.     C : ColorRec;
  11.     Ch : char;
  12.     Edit:boolean;
  13.     A : rect;
  14.     Gr,Gw : text;
  15.  
  16. {--------------------------------}
  17. begin
  18.   if not grafstart then BombOut(2);
  19.   A1 := GetMaxY div 4;
  20.   X := 14*8;
  21.   Y := A1*2 {19*8};
  22.   Wide := 40;
  23.   CPos := 1;
  24.   Edit := true;
  25.   if DispType = EGADisp then
  26.     SetColorRec(C,OffLeftWrite,yellow,blue,SolidFill)
  27.   else
  28.     SetColorRec(C,OffLeftWrite,white,black,SolidFill);
  29.   SetRect(A,10*8,A1*3,64*8,(A1*3)+8);
  30.  
  31.   outtextxy(35*8,A1,'Hello world');
  32.   GcursorType(NormalGcursor);
  33.     circle(GetMaxX shr 1,GetMaxY shr 1,199);
  34.  
  35.   S := 'Edit this string';
  36.   AssignGwCrt(Gr,X,Y,Wide,CPos,Edit,C,TS);
  37.   Reset(Gr);
  38.   AssignGwCrt(Gw,X,A1*3,Wide,CPos,Edit,C,PS);
  39.   Rewrite(Gw);
  40.  
  41.   repeat
  42.     Readln(Gr,S);
  43.     Ps := 'You entered:'+S;
  44.     Write(Gw,Ps);
  45.   until TfddChar = #$1b;
  46.  
  47.   SetGraphOff;
  48. end.